home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.3
/
Video Toaster v4.3.iso
/
4.2
/
arexx
/
toasterpaint
/
tplenses.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-04-16
|
2KB
|
75 lines
/* Weird effect of multi-lenses in front of image */
/* By Arnie Cachelin © 1994 NewTek Inc. */
parse arg InClipName","OutClipName","StartField","EndField /* These are always passed to clip processing scripts */
address 'DigiPaint' /* Tell ARexx where commands go */
screen=0
if inclipname="" & outclipname="" then screen=1
if screen=1 then do
startfield=1
endfield=1
outclipname="Test"
end
if screen=0 then do
'Askb'"This only works;with process screen."
exit
end
'Drre'
'Flon'
'Hvof' /* Turn off Horizontal and Vertical gradients */
'Hvar' /* Toggle Horiz and Vert. Gradient (on) */
'Txva' $0000
'Tyva' $0000
'Dotb'
'Poth' $F000 /* Set Gradient center to middle ($0000 - $FFFF) */
'Rang'
siz=120
do y=0 to 480-1 by siz
do x=0 to 752-1 by siz
Call CutBrush(x,y,x+siz,y+siz)
'Bcop'
'Cbx0'
'Pmcl'
Call Rectangle(x,y,x+siz,y+siz)
'Txma'
Call DrawCircle(x,y,x+siz,y+siz)
end
end
exit
Rectangle: PROCEDURE
arg x,y,x2,y2
'Drre'
'Dotb'
'Pend' x y
'Penu' x2 y2
return 0
CutBrush: PROCEDURE /* Cut out a brush with corners at (x1,y1) and (x2,y2) */
arg x1, y1, x2, y2
'Dotb' /* smallest brush size */
'Drre' /* Rectangle mode */
'Scis' /* Scissors on, for cutting a brush */
'Pend' x1 y1 /* Get in top Left corner */
'Penu' x2 y2 /* lift pen to get brush! */
return 0
DrawCircle: PROCEDURE /* Draw circle in box */
arg x1, y1, x2, y2
'Dotb' /* smallest brush size */
'Drci' /* Circle mode */
'Pend' (x2+x1)%2 (y2+y1)%2 /* Get in Center */
'Penu' x1 (y2+y1)%2 /* lift pen at edge */
return 0
Lens: PROCEDURE
arg x1, y1, x2, y2
Call CutBrush(x1,y1,x2,y2)
'Bcop'
'Txma'
Call DrawCircle(x1,y1,x2,y2)
return 0